<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>PCB ERP系统 - 报价单管理</title>
    
    <!-- Element Plus CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
    <!-- FontAwesome CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        body {
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
        }
        
        .quote-container {
            padding: 0;
            height: 100%;
            display: flex;
            flex-direction: column;
            gap: 12px;
            max-width: 1400px;
            margin: 0 auto;
        }
        
        .quote-card {
            background: white;
            border-radius: 6px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            border: 1px solid #ebeef5;
        }
        
        .quote-card-body {
            padding: 16px;
        }
        
        .card-title {
            font-size: 16px;
            font-weight: bold;
            color: #333;
            margin-bottom: 16px;
            padding-bottom: 8px;
            border-bottom: 2px solid #409eff;
        }
        
        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 16px;
            margin-bottom: 16px;
        }
        
        .form-item {
            display: flex;
            flex-direction: column;
        }
        
        .form-label {
            color: #606266;
            font-size: 14px;
            margin-bottom: 4px;
            font-weight: 500;
        }
        
        .form-input, .form-select, .form-date {
            padding: 8px 12px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            font-size: 14px;
            color: #606266;
            background-color: #fff;
            transition: border-color 0.2s;
        }
        
        .form-input:focus, .form-select:focus, .form-date:focus {
            border-color: #409eff;
            outline: none;
        }
        
        .btn-group {
            display: flex;
            gap: 8px;
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid #f0f0f0;
        }
        
        .btn {
            padding: 8px 16px;
            border-radius: 4px;
            font-weight: 500;
            font-size: 14px;
            cursor: pointer;
            border: 1px solid;
            transition: all 0.2s;
        }
        
        .btn i {
            margin-right: 4px;
        }
        
        .btn-primary {
            background-color: #409eff;
            border-color: #409eff;
            color: white;
        }
        
        .btn-primary:hover {
            background-color: #66b1ff;
            border-color: #66b1ff;
        }
        
        .btn-danger {
            background-color: #f56c6c;
            border-color: #f56c6c;
            color: white;
        }
        
        .btn-danger:hover {
            background-color: #f78989;
            border-color: #f78989;
        }
        
        .btn-success {
            background-color: #67c23a;
            border-color: #67c23a;
            color: white;
        }
        
        .btn-success:hover {
            background-color: #85ce61;
            border-color: #85ce61;
        }
        
        .material-table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 16px;
            border: 1px solid #ebeef5;
            border-radius: 6px;
            overflow: hidden;
        }
        
        .material-table th {
            background-color: #fafafa;
            font-weight: 600;
            color: #333;
            padding: 12px 8px;
            border-right: 1px solid #ebeef5;
            border-bottom: 1px solid #ebeef5;
            font-size: 14px;
            text-align: center;
        }
        
        .material-table td {
            padding: 8px;
            border-right: 1px solid #ebeef5;
            border-bottom: 1px solid #ebeef5;
            vertical-align: middle;
        }
        
        .material-table tbody tr:hover {
            background-color: #f5f7fa;
        }
        
        .table-input, .table-select {
            width: 100%;
            padding: 6px 8px;
            border: 1px solid #dcdfe6;
            border-radius: 4px;
            font-size: 13px;
            color: #606266;
        }
        
        .table-input:focus, .table-select:focus {
            border-color: #409eff;
            outline: none;
        }
        
        .sequence-cell {
            text-align: center;
            font-weight: 600;
            color: #409eff;
            background-color: #f0f9ff;
        }
        
        .action-buttons {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
            padding-top: 20px;
            border-top: 2px solid #f0f0f0;
        }
        
        .save-actions {
            display: flex;
            gap: 12px;
        }
        
        .page-title {
            background: white;
            padding: 16px;
            border-radius: 6px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            border: 1px solid #ebeef5;
            margin-bottom: 12px;
        }
        
        .page-title h1 {
            margin: 0;
            font-size: 20px;
            color: #333;
            font-weight: 600;
        }
        
        .scroll-container {
            overflow-x: auto;
        }
        
        .narrow-input {
            min-width: 80px;
        }
        
        .medium-input {
            min-width: 120px;
        }
        
        .wide-input {
            min-width: 150px;
        }
        
        @media (max-width: 768px) {
            .form-grid {
                grid-template-columns: 1fr;
            }
            
            .btn-group {
                flex-direction: column;
            }
            
            .action-buttons {
                flex-direction: column;
                gap: 12px;
            }
            
            .save-actions {
                width: 100%;
                justify-content: center;
            }
        }
    </style>
</head>
<body>
    <div class="quote-container">
        <!-- 页面标题 -->
        <div class="page-title">
            <h1><i class="fas fa-file-invoice"></i> 新增报价单</h1>
        </div>
        
        <!-- 报价基本信息 -->
        <div class="quote-card">
            <div class="quote-card-body">
                <div class="card-title">
                    <i class="fas fa-info-circle"></i> 报价基本信息
                </div>
                
                <div class="form-grid">
                    <div class="form-item">
                        <label class="form-label">客户代码 <span style="color: red;">*</span></label>
                        <select class="form-select">
                            <option value="">请选择客户代码</option>
                            <option value="C001">C001 - 华为技术有限公司</option>
                            <option value="C002">C002 - 小米科技有限公司</option>
                            <option value="C003">C003 - 比亚迪股份有限公司</option>
                        </select>
                    </div>
                    
                    <div class="form-item">
                        <label class="form-label">业务员</label>
                        <select class="form-select">
                            <option value="">请选择业务员</option>
                            <option value="E001">张三</option>
                            <option value="E002">李四</option>
                            <option value="E003">王五</option>
                        </select>
                    </div>
                    
                    <div class="form-item">
                        <label class="form-label">合同编号</label>
                        <input type="text" class="form-input" placeholder="请输入合同编号">
                    </div>
                    
                    <div class="form-item">
                        <label class="form-label">订单日期</label>
                        <input type="date" class="form-date">
                    </div>
                    
                    <div class="form-item">
                        <label class="form-label">是否含税</label>
                        <select class="form-select">
                            <option value="0">否</option>
                            <option value="1">增值税票13%</option>
                        </select>
                    </div>
                    
                    <div class="form-item">
                        <label class="form-label">付款方式</label>
                        <select class="form-select">
                            <option value="CASH">现金</option>
                            <option value="MONTHLY_30">月结30天</option>
                            <option value="MONTHLY_60">月结60天</option>
                        </select>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 信息板块1：物料基本信息 -->
        <div class="quote-card">
            <div class="quote-card-body">
                <div class="card-title">
                    <i class="fas fa-microchip"></i> 物料基本信息
                </div>
                
                <div class="scroll-container">
                    <table class="material-table">
                        <thead>
                            <tr>
                                <th style="width: 60px;">序号</th>
                                <th style="width: 120px;">产品名称</th>
                                <th style="width: 100px;">物料编码</th>
                                <th style="width: 120px;">采购订单号</th>
                                <th style="width: 80px;">层数</th>
                                <th style="width: 80px;">板厚(mm)</th>
                                <th style="width: 100px;">表面处理</th>
                                <th style="width: 80px;">阻焊</th>
                                <th style="width: 80px;">字符</th>
                                <th style="width: 80px;">板材</th>
                                <th style="width: 100px;">交货尺寸</th>
                                <th style="width: 80px;">拼版</th>
                                <th style="width: 80px;">内铜</th>
                                <th style="width: 80px;">外铜</th>
                                <th style="width: 100px;">过孔工艺</th>
                                <th style="width: 80px;">测试</th>
                                <th style="width: 100px;">测试架费</th>
                                <th style="width: 60px;">加急</th>
                                <th style="width: 80px;">数量</th>
                                <th style="width: 80px;">单价</th>
                                <th style="width: 80px;">样板费</th>
                                <th style="width: 100px;">合计金额</th>
                                <th style="width: 100px;">出货日期</th>
                                <th style="width: 150px;">备注</th>
                            </tr>
                        </thead>
                        <tbody id="material-basic-tbody">
                            <tr>
                                <td class="sequence-cell">1</td>
                                <td><input type="text" class="table-input" placeholder="产品名称"></td>
                                <td>
                                    <select class="table-select">
                                        <option value="">无</option>
                                        <option value="custom">自定义</option>
                                        <option value="PCB-001">PCB-001</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="">无</option>
                                        <option value="custom">自定义</option>
                                        <option value="PO-001">PO-001</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="1">1</option>
                                        <option value="2">2</option>
                                        <option value="4">4</option>
                                        <option value="6">6</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="1.0">1.0</option>
                                        <option value="1.2">1.2</option>
                                        <option value="1.6">1.6</option>
                                        <option value="2.0">2.0</option>
                                        <option value="2.5">2.5</option>
                                        <option value="3.0">3.0</option>
                                        <option value="0.6">0.6</option>
                                        <option value="0.8">0.8</option>
                                        <option value="other">其它</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="有铅喷锡">有铅喷锡</option>
                                        <option value="无铅喷锡">无铅喷锡</option>
                                        <option value="OSP">OSP</option>
                                        <option value="沉金">沉金</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="绿油">绿油</option>
                                        <option value="白油">白油</option>
                                        <option value="黑油">黑油</option>
                                        <option value="蓝油">蓝油</option>
                                        <option value="黄油">黄油</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="白字">白字</option>
                                        <option value="黑字">黑字</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="FR-4">FR-4</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td><input type="text" class="table-input" placeholder="尺寸(mm)"></td>
                                <td><input type="text" class="table-input" placeholder="拼版"></td>
                                <td>
                                    <select class="table-select">
                                        <option value="0.5oz">0.5oz</option>
                                        <option value="1oz">1oz</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="0.5oz">0.5oz</option>
                                        <option value="1oz">1oz</option>
                                        <option value="1.5oz">1.5oz</option>
                                        <option value="2oz">2oz</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="过孔盖油">过孔盖油</option>
                                        <option value="过孔塞油">过孔塞油</option>
                                        <option value="过孔开窗">过孔开窗</option>
                                        <option value="树脂塞油">树脂塞油</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="飞针测试">飞针测试</option>
                                        <option value="测试架">测试架</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="">无</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td>
                                    <select class="table-select">
                                        <option value="否">否</option>
                                        <option value="是">是</option>
                                    </select>
                                </td>
                                <td><input type="number" class="table-input narrow-input" placeholder="数量"></td>
                                <td>
                                    <select class="table-select">
                                        <option value="">无</option>
                                        <option value="custom">自定义</option>
                                    </select>
                                </td>
                                <td><input type="number" class="table-input narrow-input" placeholder="样板费" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="合计金额" step="0.01"></td>
                                <td><input type="date" class="table-input"></td>
                                <td><input type="text" class="table-input wide-input" placeholder="备注"></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                
                <div class="btn-group">
                    <button class="btn btn-danger" onclick="clearTableData('material-basic-tbody')">
                        <i class="fas fa-trash"></i> 清除数据
                    </button>
                    <button class="btn btn-primary" onclick="addTableRow('material-basic-tbody', 'basic')">
                        <i class="fas fa-plus"></i> 新增
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 信息板块2：尺寸和价格信息 -->
        <div class="quote-card">
            <div class="quote-card-body">
                <div class="card-title">
                    <i class="fas fa-calculator"></i> 尺寸和价格信息
                </div>
                
                <div class="scroll-container">
                    <table class="material-table">
                        <thead>
                            <tr>
                                <th style="width: 60px;">序号</th>
                                <th style="width: 80px;">宽(mm)</th>
                                <th style="width: 80px;">长(mm)</th>
                                <th style="width: 80px;">数量</th>
                                <th style="width: 120px;">订单面积(mm²)</th>
                                <th style="width: 100px;">平米价(元)</th>
                                <th style="width: 100px;">未税单价(元)</th>
                                <th style="width: 100px;">未税金额</th>
                                <th style="width: 100px;">测试架费用</th>
                                <th style="width: 120px;">未税总金额</th>
                                <th style="width: 120px;">含税总金额</th>
                                <th style="width: 100px;">含税单价</th>
                            </tr>
                        </thead>
                        <tbody id="material-price-tbody">
                            <tr>
                                <td class="sequence-cell">1</td>
                                <td><input type="number" class="table-input narrow-input" placeholder="宽度" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="长度" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="数量"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="面积" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="平米价" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="未税单价" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="未税金额" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="测试架费" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="未税总金额" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="含税总金额" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="含税单价" step="0.01"></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                
                <div class="btn-group">
                    <button class="btn btn-danger" onclick="clearTableData('material-price-tbody')">
                        <i class="fas fa-trash"></i> 清除数据
                    </button>
                    <button class="btn btn-primary" onclick="addTableRow('material-price-tbody', 'price')">
                        <i class="fas fa-plus"></i> 新增
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 信息板块3：费用明细 -->
        <div class="quote-card">
            <div class="quote-card-body">
                <div class="card-title">
                    <i class="fas fa-money-bill-wave"></i> 费用明细
                </div>
                
                <div class="scroll-container">
                    <table class="material-table">
                        <thead>
                            <tr>
                                <th style="width: 60px;">序号</th>
                                <th style="width: 120px;">板厚板材起步价</th>
                                <th style="width: 80px;">阻燃费</th>
                                <th style="width: 80px;">沉铜费</th>
                                <th style="width: 100px;">表面处理费</th>
                                <th style="width: 80px;">工程费</th>
                                <th style="width: 80px;">运费</th>
                                <th style="width: 80px;">铜厚费</th>
                                <th style="width: 80px;">超孔费</th>
                                <th style="width: 80px;">阻抗费</th>
                                <th style="width: 80px;">半孔费</th>
                                <th style="width: 80px;">合拼费</th>
                                <th style="width: 120px;">树脂塞孔费</th>
                                <th style="width: 100px;">金手指费</th>
                                <th style="width: 100px;">合计</th>
                            </tr>
                        </thead>
                        <tbody id="material-cost-tbody">
                            <tr>
                                <td class="sequence-cell">1</td>
                                <td><input type="number" class="table-input medium-input" placeholder="起步价" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="阻燃费" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="沉铜费" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="表面处理费" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="工程费" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="运费" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="铜厚费" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="超孔费" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="阻抗费" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="半孔费" step="0.01"></td>
                                <td><input type="number" class="table-input narrow-input" placeholder="合拼费" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="塞孔费" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="金手指费" step="0.01"></td>
                                <td><input type="number" class="table-input medium-input" placeholder="费用合计" step="0.01"></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                
                <div class="btn-group">
                    <button class="btn btn-danger" onclick="clearTableData('material-cost-tbody')">
                        <i class="fas fa-trash"></i> 清除数据
                    </button>
                    <button class="btn btn-primary" onclick="addTableRow('material-cost-tbody', 'cost')">
                        <i class="fas fa-plus"></i> 新增
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 保存操作区域 -->
        <div class="action-buttons">
            <div></div>
            <div class="save-actions">
                <button class="btn btn-success">
                    <i class="fas fa-save"></i> 保存草稿
                </button>
                <button class="btn btn-primary">
                    <i class="fas fa-paper-plane"></i> 提交报价
                </button>
                <button class="btn" style="background-color: #909399; border-color: #909399; color: white;">
                    <i class="fas fa-times"></i> 取消
                </button>
            </div>
        </div>
    </div>

    <script>
        // 添加新行的函数
        function addTableRow(tbodyId, type) {
            const tbody = document.getElementById(tbodyId);
            const rowCount = tbody.children.length + 1;
            let rowHtml = '';
            
            if (type === 'basic') {
                rowHtml = `
                    <tr>
                        <td class="sequence-cell">${rowCount}</td>
                        <td><input type="text" class="table-input" placeholder="产品名称"></td>
                        <td>
                            <select class="table-select">
                                <option value="">无</option>
                                <option value="custom">自定义</option>
                                <option value="PCB-001">PCB-001</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="">无</option>
                                <option value="custom">自定义</option>
                                <option value="PO-001">PO-001</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="1">1</option>
                                <option value="2">2</option>
                                <option value="4">4</option>
                                <option value="6">6</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="1.0">1.0</option>
                                <option value="1.2">1.2</option>
                                <option value="1.6">1.6</option>
                                <option value="2.0">2.0</option>
                                <option value="2.5">2.5</option>
                                <option value="3.0">3.0</option>
                                <option value="0.6">0.6</option>
                                <option value="0.8">0.8</option>
                                <option value="other">其它</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="有铅喷锡">有铅喷锡</option>
                                <option value="无铅喷锡">无铅喷锡</option>
                                <option value="OSP">OSP</option>
                                <option value="沉金">沉金</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="绿油">绿油</option>
                                <option value="白油">白油</option>
                                <option value="黑油">黑油</option>
                                <option value="蓝油">蓝油</option>
                                <option value="黄油">黄油</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="白字">白字</option>
                                <option value="黑字">黑字</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="FR-4">FR-4</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td><input type="text" class="table-input" placeholder="尺寸(mm)"></td>
                        <td><input type="text" class="table-input" placeholder="拼版"></td>
                        <td>
                            <select class="table-select">
                                <option value="0.5oz">0.5oz</option>
                                <option value="1oz">1oz</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="0.5oz">0.5oz</option>
                                <option value="1oz">1oz</option>
                                <option value="1.5oz">1.5oz</option>
                                <option value="2oz">2oz</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="过孔盖油">过孔盖油</option>
                                <option value="过孔塞油">过孔塞油</option>
                                <option value="过孔开窗">过孔开窗</option>
                                <option value="树脂塞油">树脂塞油</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="飞针测试">飞针测试</option>
                                <option value="测试架">测试架</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="">无</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td>
                            <select class="table-select">
                                <option value="否">否</option>
                                <option value="是">是</option>
                            </select>
                        </td>
                        <td><input type="number" class="table-input narrow-input" placeholder="数量"></td>
                        <td>
                            <select class="table-select">
                                <option value="">无</option>
                                <option value="custom">自定义</option>
                            </select>
                        </td>
                        <td><input type="number" class="table-input narrow-input" placeholder="样板费" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="合计金额" step="0.01"></td>
                        <td><input type="date" class="table-input"></td>
                        <td><input type="text" class="table-input wide-input" placeholder="备注"></td>
                    </tr>
                `;
            } else if (type === 'price') {
                rowHtml = `
                    <tr>
                        <td class="sequence-cell">${rowCount}</td>
                        <td><input type="number" class="table-input narrow-input" placeholder="宽度" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="长度" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="数量"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="面积" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="平米价" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="未税单价" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="未税金额" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="测试架费" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="未税总金额" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="含税总金额" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="含税单价" step="0.01"></td>
                    </tr>
                `;
            } else if (type === 'cost') {
                rowHtml = `
                    <tr>
                        <td class="sequence-cell">${rowCount}</td>
                        <td><input type="number" class="table-input medium-input" placeholder="起步价" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="阻燃费" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="沉铜费" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="表面处理费" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="工程费" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="运费" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="铜厚费" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="超孔费" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="阻抗费" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="半孔费" step="0.01"></td>
                        <td><input type="number" class="table-input narrow-input" placeholder="合拼费" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="塞孔费" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="金手指费" step="0.01"></td>
                        <td><input type="number" class="table-input medium-input" placeholder="费用合计" step="0.01"></td>
                    </tr>
                `;
            }
            
            tbody.insertAdjacentHTML('beforeend', rowHtml);
        }
        
        // 清除表格数据的函数
        function clearTableData(tbodyId) {
            if (confirm('确定要清除当前板块的所有数据吗？此操作不可撤销。')) {
                const tbody = document.getElementById(tbodyId);
                tbody.innerHTML = '';
                // 重新添加一行空数据
                const type = tbodyId.includes('basic') ? 'basic' : 
                            tbodyId.includes('price') ? 'price' : 'cost';
                addTableRow(tbodyId, type);
            }
        }
        
        // 页面加载完成后的初始化
        document.addEventListener('DOMContentLoaded', function() {
            console.log('报价单页面已加载');
        });
    </script>
</body>
</html> 